<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title>mouse</title>
    <style type="text/css">
        #div {
            overflow: auto;
            width: 200px;
            height: 200px;
            border: 2px solid gray;
            margin-bottom: 20px;
        }

        #content {
            width: 200px;
            height: 100px;
            border: 2px solid gray;
        }
    </style>
</head>

<body>
    <div id="div">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod,tempor incididunt ut labore et
            dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
            commodo,consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse,cillum dolore eu fugiat
            nulla pariatur. Excepteur sint occaecat cupidatat non,proident, sunt in culpa qui officia deserunt mollit
            anim id est laborum.</p>
    </div>
    <div id="content"></div>
    <script type="text/javascript">
        //补充代码
        var div = document.getElementById("div");
        var content = document.getElementById("content");
        div.onscroll = function () {
            content.innerHTML = "内容滚动了";
            div.style.color = "red";
        }
        // div.onmousemove = function () {
        //     div.style.color = "red";
        // }
        div.onmouseout = function () {
            div.style.color = "green";
        }
        document.onkeydown = function (event) {
            console.log(event.keyCode);
        }
    </script>
</body>

</html>